﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace J1502B.ZXMSC.BLL
{
    public abstract class BLLBase<T, U>
        where T : Model.ModelBase
        where U : IDAL.IDALBase<T>
    {
        /// <summary>
        /// 数据操作对象
        /// </summary>
        private U _dal;

        /// <summary>
        /// 数据操作对象【IDAL 仓储对象】
        /// </summary>
        protected U dal
        {
            get
            {
                return this._dal;
            }
            set
            {
                this._dal = value;
            }
        }
        /// <summary>
        /// 插入一条数据
        /// </summary>
        /// <param name="info">实体对象</param>
        /// <returns>插入的数据的标识</returns>
        public int InsertInfo(T info)
        {
            return dal.InsertInfo(info);
        }

        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public List<T> Show()
        {
            return dal.Show();
        }
    }
}
